<?php
/*************************************************

广告模块公共控制器 - the 
Author: WangHuabin <17-5-27>

*************************************************/
namespace Home\Controller;
use Think\Controller;
class AdController extends Controller {

    public function get_ad($tag){
        //获取广告位
        $map['tag'] = $tag;
        $position = D('AdPosition')->get_one($map);
		
        //查询广告信息
        $map = array();
        $map['pid'] = $position['id'];
        $data = D('AdInfo')->get_all($map);
		
        return $data;
    }

}